package com.vacation.vacationdemo.service.impl;

import com.vacation.vacationdemo.entity.Employee;
import com.vacation.vacationdemo.mapper.EmployeeMapper;
import com.vacation.vacationdemo.service.LoginService;
import com.vacation.vacationdemo.vo.EmployeeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 杨光
 * @date 2022年03月09日 19:05
 */
@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public Employee doLogin(String empNo, String empPassword) {
        Employee employee = employeeMapper.selectEmployeeByEmpNoAndPassword(empNo, empPassword);
        return employee;
    }

    @Override
    public EmployeeVo selectEmployeeByEmpNo(String empNo) {
        EmployeeVo employeeVo = employeeMapper.selectEmployeeByEmpNo(empNo);
        return employeeVo;
    }
}
